/*
 * Map.cpp
 *
 *  Created on: Nov 20, 2012
 *      Author: William Agnew [agnewwt@muohio.edu]
 */

#include "Map.h"

Map::Map()
{

}

Map::Map(int rowNum, int colNum, int rowStart, int colStart)
{
	this->rowNum = rowNum;
	this->colNum = colNum;
	this->rowStart = rowStart;
	this->colStart = colStart;


	// Create 2D array of Positions
	position = new Position*[rowNum];
	for(int i = 0; i < rowNum; i++)
		position[i] = new Position[colNum];

	/*
	int** twoDArray = new int*[10];
	for(int i=0; i < 10; i++)
	   twoDArray[i] = new int[10];
	*/
}

Map::~Map()
{
	// Delete 2D array
	/*
	for(int i = 0; i < 2; i++)
		delete [] position[i];
	delete [] position;
	*/
}

int Map::getRowNum() const
{
    return rowNum;
}

void Map::setRowNum(int rowNum)
{
    this->rowNum = rowNum;
}

int Map::getColNum() const
{
    return colNum;
}

void Map::setColNum(int colNum)
{
    this->colNum = colNum;
}

int Map::getRowStart() const
{
    return rowStart;
}

void Map::setRowStart(int rowStart)
{
    this->rowStart = rowStart;
}

int Map::getColStart() const
{
    return colStart;
}

void Map::setColStart(int colStart)
{
    this->colStart = colStart;
}

void Map::printMap()
{
	for(int i = 0; i < colNum; i++)
	{
		for(int j = 0; j < rowNum; j++)
		{
			cout << position[i][j].getSymbol();
		}
		cout << endl;
	}
	cout << endl;
}



